﻿
@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_LayoutForEUI.cshtml";
}

<table class="table table-celled">
    <thead>
    </thead>
    <tbody>
        <tr>
            <td>
                <select id="SysPZ_Index_cmb_status1" class="easyui-combobox" labelposition="top" label="是否开启邮箱功能" data-options="editable:false" name="SysPZ_Index_cmb_status1" style="width:100%;" panelHeight="auto">
                    @{
                        if (ViewBag.STATUS == "1")
                        {
                            <option value="1" selected="selected">是</option>
                            <option value="0">否</option>
                        }
                        else
                        {
                            <option value="1">是</option>
                            <option value="0" selected="selected">否</option>
                        }
                    }
                </select>
            </td>
        </tr>
        <tr>
            <td><input class="easyui-textbox" label="密码过期天数" labelposition="top" style="width:100%" id="SysPZ_Index_txtDay" value="@ViewBag.DAY" /></td>
        </tr>
    </tbody>
    <tfoot>
        <tr>
            <th>
                <a href="javascipt:void(0);" class="easyui-linkbutton button-blue pull-right" style="width:100px" data-options="iconCls:'icon-ok'" onclick="Add()">保存</a>
            </th>
        </tr>
    </tfoot>
</table>
<script>
    function Add() {
        var day = $('#SysPZ_Index_txtDay').val();
        var status1 = $('#SysPZ_Index_cmb_status1').datebox('getValue');
            $.ajax({
                url: '/SysPZ/PZ',
                dataType: 'text',
                type: 'post',
                data: { value1: status1, value2: day },
                success: function (data) {
                    $.messager.alert('提示！', "设置成功", 'info');
                }
            });
    }
</script>

